def executeCmd(){
    def result = ['cmd.exe', '/c' ,'echo 123'].execute().text.readLines()
    //result = 'curl ftp://172.25.53.207/1.1.1-20201203141207-alpha/meta-info.md -u web:web'.execute()
    println result

}

def executePowershell(){
    def result = ['powershell.exe', '/c' ,'echo 123'].execute().text.readLines()

    println result
    println result.getClass()
    println result.get(0)
    print "123"    
}


executeCmd()

//executePowershell()

def executeCommand3(){
    // 直接执行
    lines = ('lftp 172.25.53.207 -p 21 -u web,web  -e "cd / ; ls; quit;"'.execute().text.readLines())
    println lines.findAll({it[0] == "d"}).collect({it.split()[-1]})
    println lines.findAll({it[0] == "d"}).size()

}
//executeCommand3()

//"C:\\Program Files\\Git\\mingw64\\bin\\curl.exe ftp://172.25.53.207/1.1.1-20201203141207-alpha/meta-info.md -u web:web".execute()
